package com.up.api.control;

import com.up.api.repository.Student;
import com.up.api.repository.StudentService;
import com.up.api.service.MongoService;
import com.up.tools.annotation.EnableAutoTryCatch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: liuchengjun
 * @title: MongoControl
 * @projectName: 海联技术中台V2.0
 * @depart 软件事业部
 * @description:
 * @date: 2024/1/30/030 14:24 (星期二)
 * @since V2.0
 */
@RestController
@RequestMapping("/up/mongo")
@Validated
@EnableAutoTryCatch
public class MongoControl {
    @Autowired
    private StudentService studentService;
    @GetMapping("/getStudent")
    public Student getStudent() {
        return studentService.findById("1");
    }
}
